﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Media.Imaging;
using System.Text.RegularExpressions;

namespace MolfMolfMolf.MolfControl
{
    public partial class StarRating : UserControl
    {
        public int rate = 0;
        public StarRating()
        {
            InitializeComponent();
            //star1.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/starsilver.png", UriKind.Relative));
            //star2.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/starsilver.png", UriKind.Relative));
            //star3.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/starsilver.png", UriKind.Relative));
            //star4.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/starsilver.png", UriKind.Relative));
            //star5.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/starsilver.png", UriKind.Relative));
        }
        public int GetRate()
        {
            return rate;
        }

        private void star1_Tap(object sender, GestureEventArgs e)
        {
            star1.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/star.png", UriKind.Relative));
            star2.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/starsilver.png", UriKind.Relative));
            star3.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/starsilver.png", UriKind.Relative));
            star4.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/starsilver.png", UriKind.Relative));
            star5.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/starsilver.png", UriKind.Relative));
            rate = 1;
            RatingComment.Text = "Terrible";
        }

        private void star2_Tap(object sender, GestureEventArgs e)
        {
            star1.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/star.png", UriKind.Relative));
            star2.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/star.png", UriKind.Relative));
            star3.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/starsilver.png", UriKind.Relative));
            star4.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/starsilver.png", UriKind.Relative));
            star5.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/starsilver.png", UriKind.Relative));
            rate = 2;
            RatingComment.Text = "Poor";

        }

        private void star3_Tap(object sender, GestureEventArgs e)
        {
            star1.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/star.png", UriKind.Relative));
            star2.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/star.png", UriKind.Relative));
            star3.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/star.png", UriKind.Relative));
            star4.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/starsilver.png", UriKind.Relative));
            star5.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/starsilver.png", UriKind.Relative));
            rate = 3;
            RatingComment.Text = "Average";
        }

        private void star4_Tap(object sender, GestureEventArgs e)
        {
            star1.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/star.png", UriKind.Relative));
            star2.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/star.png", UriKind.Relative));
            star3.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/star.png", UriKind.Relative));
            star4.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/star.png", UriKind.Relative));
            star5.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/starsilver.png", UriKind.Relative));
            rate = 4;
            RatingComment.Text = "Good";

        }

        private void star5_Tap(object sender, GestureEventArgs e)
        {
            star1.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/star.png", UriKind.Relative));
            star2.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/star.png", UriKind.Relative));
            star3.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/star.png", UriKind.Relative));
            star4.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/star.png", UriKind.Relative));
            star5.Source = new BitmapImage(new Uri("/MolfMolfMolf;Component/Images/star.png", UriKind.Relative));
            rate = 5;
            RatingComment.Text = "Fantastic";

        }



        public object Images { get; set; }

        
    }
}
